package la.iok.hzsvn.lewin.movie.operation.controller;

import la.iok.hzsvn.lewin.movie.core.model.FinancialAccountVo;
import la.iok.hzsvn.lewin.movie.operation.service.FinancialAccountService;
import la.iok.hzsvn.share.response.ListDataResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;

@RestController
@RequestMapping("internal-api/financialAccounts")
public class FinancialAccountInternalController {
    private final FinancialAccountService financialAccountService;

    public FinancialAccountInternalController(FinancialAccountService financialAccountService) {
        this.financialAccountService = financialAccountService;
    }

    @GetMapping
    public ListDataResponse<FinancialAccountVo> accounts(Long[] roomId){
        return new ListDataResponse<>(financialAccountService.accounts(Arrays.asList(roomId)));
    }
}
